import { BaseEntity, Column, Entity, PrimaryGeneratedColumn } from "typeorm";
import { RoomEntity } from "./room.entity";

@Entity({ name: 'guest' })
export class GuestEntity extends BaseEntity {
    @PrimaryGeneratedColumn()
    id: number;

    @Column({
        type: 'varchar',
        length: 300
    })
    yourname: string;//姓名

    @Column({
        type: 'varchar',
        length: 300
    })
    phone: string;//电话号码

    @Column({
        type: 'varchar',
        length: 300,
        default: "--"
    })
    sex: string;//性别

    @Column({
        type: 'varchar',
        length: 300,
        default: "--"
    })
    nation: string;//民族

    @Column({
        type: 'varchar',
        length: 300
    })
    card: string;//身份证号

    @Column({
        type: 'varchar',
        length: 300,
        default: "--"
    })
    address: string;//地址

    @Column({
        type: 'tinyint',
        default: 1
    })
    status: 0 | 1;//0：禁用，1: 启用

    room: RoomEntity //住客所住房间

}